home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  48.7 KB  |  1,188 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Script.h
  3.  
  4.      Contains:    Script Manager interfaces
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1986-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __SCRIPT__
  18. #define __SCRIPT__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __QUICKDRAW__
  25.     #include <Quickdraw.h>
  26. #endif
  27.  
  28. #ifndef __INTLRESOURCES__
  29.     #include <IntlResources.h>
  30. #endif
  31.  
  32. #ifndef __EVENTS__
  33.     #include <Events.h>
  34. #endif
  35.  
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. /* Meta script codes:*/
  60. enum {
  61.     smSystemScript                = -1,                            /* designates system script.*/
  62.     smCurrentScript                = -2,                            /* designates current font script.*/
  63.     smAllScripts                = -3                            /* designates any script*/
  64. };
  65.  
  66. /*
  67.    Script codes:
  68.    These specify a Mac OS encoding that is related to a FOND ID range.
  69.    Some of the encodings have several variants (e.g. for different localized systems)
  70.     which all share the same script code.
  71.    Not all of these script codes are currently supported by Apple software.
  72.    Notes:
  73.    - Script code 0 (smRoman) is also used (instead of smGreek) for the Greek encoding
  74.      in the Greek localized system.
  75.    - Script code 28 (smEthiopic) is also used for the Inuit encoding in the Inuktitut
  76.      system.
  77. */
  78. enum {
  79.     smRoman                        = 0,
  80.     smJapanese                    = 1,
  81.     smTradChinese                = 2,                            /* Traditional Chinese*/
  82.     smKorean                    = 3,
  83.     smArabic                    = 4,
  84.     smHebrew                    = 5,
  85.     smGreek                        = 6,
  86.     smCyrillic                    = 7,
  87.     smRSymbol                    = 8,                            /* Right-left symbol*/
  88.     smDevanagari                = 9,
  89.     smGurmukhi                    = 10,
  90.     smGujarati                    = 11,
  91.     smOriya                        = 12,
  92.     smBengali                    = 13,
  93.     smTamil                        = 14,
  94.     smTelugu                    = 15,
  95.     smKannada                    = 16,                            /* Kannada/Kanarese*/
  96.     smMalayalam                    = 17,
  97.     smSinhalese                    = 18,
  98.     smBurmese                    = 19,
  99.     smKhmer                        = 20,                            /* Khmer/Cambodian*/
  100.     smThai                        = 21,
  101.     smLao                        = 22,
  102.     smGeorgian                    = 23,
  103.     smArmenian                    = 24,
  104.     smSimpChinese                = 25,                            /* Simplified Chinese*/
  105.     smTibetan                    = 26,
  106.     smMongolian                    = 27,
  107.     smEthiopic                    = 28,
  108.     smGeez                        = 28,                            /* Synonym for smEthiopic*/
  109.     smCentralEuroRoman            = 29,                            /* For Czech, Slovak, Polish, Hungarian, Baltic langs*/
  110.     smVietnamese                = 30,
  111.     smExtArabic                    = 31,                            /* extended Arabic*/
  112.     smUninterp                    = 32                            /* uninterpreted symbols, e.g. palette symbols*/
  113. };
  114.  
  115. /* Extended script code for full Unicode input*/
  116. enum {
  117.     smUnicodeScript                = 0x7E
  118. };
  119.  
  120. /* Obsolete script code names (kept for backward compatibility):*/
  121. enum {
  122.     smChinese                    = 2,                            /* (Use smTradChinese or smSimpChinese)*/
  123.     smRussian                    = 7,                            /* Use smCyrillic*/
  124.                                                                 /* smMaldivian = 25: deleted, no code for Maldivian*/
  125.     smLaotian                    = 22,                            /* Use smLao                                                            */
  126.     smAmharic                    = 28,                            /* Use smEthiopic or smGeez*/
  127.     smSlavic                    = 29,                            /* Use smCentralEuroRoman*/
  128.     smEastEurRoman                = 29,                            /* Use smCentralEuroRoman*/
  129.     smSindhi                    = 31,                            /* Use smExtArabic*/
  130.     smKlingon                    = 32
  131. };
  132.  
  133. /*
  134.    Language codes:
  135.    These specify a language implemented using a particular Mac OS encoding.
  136.    Not all of these language codes are currently supported by Apple software.
  137. */
  138. enum {
  139.     langEnglish                    = 0,                            /* smRoman script*/
  140.     langFrench                    = 1,                            /* smRoman script*/
  141.     langGerman                    = 2,                            /* smRoman script*/
  142.     langItalian                    = 3,                            /* smRoman script*/
  143.     langDutch                    = 4,                            /* smRoman script*/
  144.     langSwedish                    = 5,                            /* smRoman script*/
  145.     langSpanish                    = 6,                            /* smRoman script*/
  146.     langDanish                    = 7,                            /* smRoman script*/
  147.     langPortuguese                = 8,                            /* smRoman script*/
  148.     langNorwegian                = 9,                            /* smRoman script*/
  149.     langHebrew                    = 10,                            /* smHebrew script*/
  150.     langJapanese                = 11,                            /* smJapanese script*/
  151.     langArabic                    = 12,                            /* smArabic script*/
  152.     langFinnish                    = 13,                            /* smRoman script*/
  153.     langGreek                    = 14,                            /* Greek script using smRoman script code*/
  154.     langIcelandic                = 15,                            /* modified smRoman/Icelandic script*/
  155.     langMaltese                    = 16,                            /* Roman script*/
  156.     langTurkish                    = 17,                            /* modified smRoman/Turkish script*/
  157.     langCroatian                = 18,                            /* modified smRoman/Croatian script*/
  158.     langTradChinese                = 19,                            /* Chinese (Mandarin) in traditional characters*/
  159.     langUrdu                    = 20,                            /* smArabic script*/
  160.     langHindi                    = 21,                            /* smDevanagari script*/
  161.     langThai                    = 22,                            /* smThai script*/
  162.     langKorean                    = 23                            /* smKorean script*/
  163. };
  164.  
  165. enum {
  166.     langLithuanian                = 24,                            /* smCentralEuroRoman script*/
  167.     langPolish                    = 25,                            /* smCentralEuroRoman script*/
  168.     langHungarian                = 26,                            /* smCentralEuroRoman script*/
  169.     langEstonian                = 27,                            /* smCentralEuroRoman script*/
  170.     langLatvian                    = 28,                            /* smCentralEuroRoman script*/
  171.     langSami                    = 29,                            /* language of the Sami people of N. Scandinavia                        */
  172.     langFaroese                    = 30,                            /* modified smRoman/Icelandic script                                    */
  173.     langFarsi                    = 31,                            /* modified smArabic/Farsi script*/
  174.     langPersian                    = 31,                            /* Synonym for langFarsi*/
  175.     langRussian                    = 32,                            /* smCyrillic script*/
  176.     langSimpChinese                = 33,                            /* Chinese (Mandarin) in simplified characters*/
  177.     langFlemish                    = 34,                            /* smRoman script*/
  178.     langIrishGaelic                = 35,                            /* smRoman or modified smRoman/Celtic script (without dot above)        */
  179.     langAlbanian                = 36,                            /* smRoman script*/
  180.     langRomanian                = 37,                            /* modified smRoman/Romanian script*/
  181.     langCzech                    = 38,                            /* smCentralEuroRoman script*/
  182.     langSlovak                    = 39,                            /* smCentralEuroRoman script*/
  183.     langSlovenian                = 40,                            /* modified smRoman/Croatian script*/
  184.     langYiddish                    = 41,                            /* smHebrew script*/
  185.     langSerbian                    = 42,                            /* smCyrillic script*/
  186.     langMacedonian                = 43,                            /* smCyrillic script*/
  187.     langBulgarian                = 44,                            /* smCyrillic script*/
  188.     langUkrainian                = 45,                            /* modified smCyrillic/Ukrainian script*/
  189.     langByelorussian            = 46,                            /* smCyrillic script*/
  190.     langBelorussian                = 46                            /* Synonym for langByelorussian                                            */
  191. };
  192.  
  193. enum {
  194.     langUzbek                    = 47,                            /* Cyrillic script*/
  195.     langKazakh                    = 48,                            /* Cyrillic script*/
  196.     langAzerbaijani                = 49,                            /* Azerbaijani in Cyrillic script*/
  197.     langAzerbaijanAr            = 50,                            /* Azerbaijani in Arabic script*/
  198.     langArmenian                = 51,                            /* smArmenian script*/
  199.     langGeorgian                = 52,                            /* smGeorgian script*/
  200.     langMoldavian                = 53,                            /* smCyrillic script*/
  201.     langKirghiz                    = 54,                            /* Cyrillic script*/
  202.     langTajiki                    = 55,                            /* Cyrillic script*/
  203.     langTurkmen                    = 56,                            /* Cyrillic script*/
  204.     langMongolian                = 57,                            /* Mongolian in smMongolian script*/
  205.     langMongolianCyr            = 58,                            /* Mongolian in Cyrillic script*/
  206.     langPashto                    = 59,                            /* Arabic script*/
  207.     langKurdish                    = 60,                            /* smArabic script*/
  208.     langKashmiri                = 61,                            /* Arabic script*/
  209.     langSindhi                    = 62,                            /* Arabic script*/
  210.     langTibetan                    = 63,                            /* smTibetan script*/
  211.     langNepali                    = 64,                            /* smDevanagari script*/
  212.     langSanskrit                = 65,                            /* smDevanagari script*/
  213.     langMarathi                    = 66,                            /* smDevanagari script*/
  214.     langBengali                    = 67,                            /* smBengali script*/
  215.     langAssamese                = 68,                            /* smBengali script*/
  216.     langGujarati                = 69,                            /* smGujarati script*/
  217.     langPunjabi                    = 70                            /* smGurmukhi script*/
  218. };
  219.  
  220. enum {
  221.     langOriya                    = 71,                            /* smOriya script*/
  222.     langMalayalam                = 72,                            /* smMalayalam script*/
  223.     langKannada                    = 73,                            /* smKannada script*/
  224.     langTamil                    = 74,                            /* smTamil script*/
  225.     langTelugu                    = 75,                            /* smTelugu script*/
  226.     langSinhalese                = 76,                            /* smSinhalese script*/
  227.     langBurmese                    = 77,                            /* smBurmese script*/
  228.     langKhmer                    = 78,                            /* smKhmer script*/
  229.     langLao                        = 79,                            /* smLao script*/
  230.     langVietnamese                = 80,                            /* smVietnamese script*/
  231.     langIndonesian                = 81,                            /* smRoman script*/
  232.     langTagalog                    = 82,                            /* Roman script*/
  233.     langMalayRoman                = 83,                            /* Malay in smRoman script*/
  234.     langMalayArabic                = 84,                            /* Malay in Arabic script*/
  235.     langAmharic                    = 85,                            /* smEthiopic script*/
  236.     langTigrinya                = 86,                            /* smEthiopic script*/
  237.     langOromo                    = 87,                            /* smEthiopic script*/
  238.     langSomali                    = 88,                            /* smRoman script*/
  239.     langSwahili                    = 89,                            /* smRoman script*/
  240.     langKinyarwanda                = 90,                            /* smRoman script*/
  241.     langRuanda                    = 90,                            /* synonym for langKinyarwanda*/
  242.     langRundi                    = 91,                            /* smRoman script*/
  243.     langNyanja                    = 92,                            /* smRoman script*/
  244.     langChewa                    = 92,                            /* synonym for langNyanja*/
  245.     langMalagasy                = 93,                            /* smRoman script*/
  246.     langEsperanto                = 94                            /* Roman script*/
  247. };
  248.  
  249. enum {
  250.     langWelsh                    = 128,                            /* modified smRoman/Celtic script*/
  251.     langBasque                    = 129,                            /* smRoman script*/
  252.     langCatalan                    = 130,                            /* smRoman script*/
  253.     langLatin                    = 131,                            /* smRoman script*/
  254.     langQuechua                    = 132,                            /* smRoman script*/
  255.     langGuarani                    = 133,                            /* smRoman script*/
  256.     langAymara                    = 134,                            /* smRoman script*/
  257.     langTatar                    = 135,                            /* Cyrillic script*/
  258.     langUighur                    = 136,                            /* Arabic script*/
  259.     langDzongkha                = 137,                            /* (lang of Bhutan) smTibetan script*/
  260.     langJavaneseRom                = 138,                            /* Javanese in smRoman script*/
  261.     langSundaneseRom            = 139,                            /* Sundanese in smRoman script*/
  262.     langGalician                = 140,                            /* smRoman script*/
  263.     langAfrikaans                = 141                            /* smRoman script                                                        */
  264. };
  265.  
  266. enum {
  267.     langBreton                    = 142,                            /* smRoman or modified smRoman/Celtic script                            */
  268.     langInuktitut                = 143,                            /* Inuit script using smEthiopic script code                            */
  269.     langScottishGaelic            = 144,                            /* smRoman or modified smRoman/Celtic script                            */
  270.     langManxGaelic                = 145,                            /* smRoman or modified smRoman/Celtic script                            */
  271.     langIrishGaelicScript        = 146,                            /* modified smRoman/Gaelic script (using dot above)                        */
  272.     langTongan                    = 147,                            /* smRoman script                                                        */
  273.     langGreekPoly                = 148,                            /* smGreek script                                                        */
  274.     langGreenlandic                = 149                            /* smRoman script                                                        */
  275. };
  276.  
  277. enum {
  278.     langUnspecified                = 32767                            /* Special code for use in resources (such as 'itlm')                    */
  279. };
  280.  
  281. /*
  282.    Obsolete language code names (kept for backward compatibility):
  283.    Misspelled, ambiguous, misleading, considered pejorative, archaic, etc.
  284. */
  285. enum {
  286.     langPortugese                = 8,                            /* Use langPortuguese*/
  287.     langMalta                    = 16,                            /* Use langMaltese*/
  288.     langYugoslavian                = 18,                            /* (use langCroatian, langSerbian, etc.)*/
  289.     langChinese                    = 19,                            /* (use langTradChinese or langSimpChinese)*/
  290.     langLettish                    = 28,                            /* Use langLatvian                                                        */
  291.     langLapponian                = 29,                            /* Use langSami*/
  292.     langLappish                    = 29,                            /* Use langSami*/
  293.     langSaamisk                    = 29,                            /* Use langSami                                                            */
  294.     langFaeroese                = 30,                            /* Use langFaroese                                                        */
  295.     langIrish                    = 35,                            /* Use langIrishGaelic                                                    */
  296.     langGalla                    = 87,                            /* Use langOromo                                                        */
  297.     langAfricaans                = 141                            /* Use langAfrikaans                                                    */
  298. };
  299.  
  300. /*
  301.    Region codes:
  302.    These typically specify a combination of a language code and a particular region.
  303.    Some of these numeric values are reserved just for extra resource IDs associated
  304.    with certain regions; these are not actual region codes, and are noted in the comments.
  305.    Not all of the region codes are currently supported by Apple software.
  306.    When relevant, the following list also provides:
  307.    - The Apple part number (P/N) code for software localized for the specified region.
  308.    - The two-letter ISO language and country codes (from ISO 639 and ISO 3166). The
  309.      language code (lowercase) is first, then '_', then the country code (uppercase).
  310. */
  311.  
  312. enum {
  313.                                                                 /* P/N    ISO    codes    comments*/
  314.     verUS                        = 0,                            /*        en_US*/
  315.     verFrance                    = 1,                            /* F    fr_FR*/
  316.     verBritain                    = 2,                            /* B    en_GB*/
  317.     verGermany                    = 3,                            /* D    de_DE*/
  318.     verItaly                    = 4,                            /* T    it_IT*/
  319.     verNetherlands                = 5,                            /* N    nl_NL*/
  320.     verFlemish                    = 6,                            /* FN    nl_BE        Flemish (Dutch) for Belgium                            */
  321.     verSweden                    = 7,                            /* S    sv_SE*/
  322.     verSpain                    = 8,                            /* E    es_ES        Spanish for Spain*/
  323.     verDenmark                    = 9,                            /* DK    da_DK*/
  324.     verPortugal                    = 10,                            /* PO    pt_PT        Portuguese for Portugal*/
  325.     verFrCanada                    = 11,                            /* C    fr_CA        French for Canada*/
  326.     verNorway                    = 12,                            /* H    no_NO        Bokm.l*/
  327.     verIsrael                    = 13,                            /* HB    iw_IL        Hebrew*/
  328.     verJapan                    = 14,                            /* J    ja_JP*/
  329.     verAustralia                = 15,                            /* X    en_AU        English for Australia*/
  330.     verArabic                    = 16,                            /* AB    ar            Arabic for N Africa, Arabian peninsula, Levant*/
  331.     verFinland                    = 17,                            /* K    fi_FI*/
  332.     verFrSwiss                    = 18,                            /* SF    fr_CH        French Swiss*/
  333.     verGrSwiss                    = 19,                            /* SD    de_CH        German Swiss*/
  334.     verGreece                    = 20,                            /* GR    el_GR        Monotonic Greek (modern)*/
  335.     verIceland                    = 21,                            /* IS    is_IS*/
  336.     verMalta                    = 22,                            /* MA    mt_MT*/
  337.     verCyprus                    = 23,                            /* CY      _CY        Greek or Turkish language? Checking...*/
  338.     verTurkey                    = 24,                            /* TU    tr_TR*/
  339.     verYugoCroatian                = 25                            /* YU                Croatian for Yugoslavia; now use verCroatia (68)*/
  340. };
  341.  
  342. enum {
  343.     verNetherlandsComma            = 26,                            /*                    ID for KCHR resource - Dutch*/
  344.     verBelgiumLuxPoint            = 27,                            /*                    ID for KCHR resource - Belgium*/
  345.     verCanadaComma                = 28,                            /*                    ID for KCHR resource - Canadian ISO*/
  346.     verCanadaPoint                = 29,                            /*                    ID for KCHR resource - Canadian; now unused*/
  347.     vervariantPortugal            = 30,                            /*                    ID for resource; now unused*/
  348.     vervariantNorway            = 31,                            /*                    ID for resource; now unused*/
  349.     vervariantDenmark            = 32                            /*                    ID for KCHR resource - Danish Mac Plus*/
  350. };
  351.  
  352. enum {
  353.     verIndiaHindi                = 33,                            /*        hi_IN        Hindi for India*/
  354.     verPakistanUrdu                = 34,                            /* UR    ur_PK        Urdu for Pakistan                                    */
  355.     verTurkishModified            = 35,
  356.     verItalianSwiss                = 36,                            /* ST    it_CH        Italian Swiss*/
  357.     verInternational            = 37,                            /* Z    en            English for international use                        */
  358.                                                                 /*                    38 is unassigned*/
  359.     verRomania                    = 39,                            /* RO    ro_RO*/
  360.     verGreecePoly                = 40,                            /*                    Polytonic Greek (classical)                            */
  361.     verLithuania                = 41,                            /* LT    lt_LT*/
  362.     verPoland                    = 42,                            /* PL    pl_PL*/
  363.     verHungary                    = 43,                            /* MG    hu_HU*/
  364.     verEstonia                    = 44,                            /* EE    et_EE*/
  365.     verLatvia                    = 45,                            /* LV    lv_LV*/
  366.     verSami                        = 46,                            /*        se                                                                */
  367.     verFaroeIsl                    = 47,                            /* FA    fo_FO                                                            */
  368.     verIran                        = 48,                            /* PS    fa_IR        Persian/Farsi*/
  369.     verRussia                    = 49,                            /* RS    ru_RU        Russian*/
  370.     verIreland                    = 50,                            /* GA    ga_IE        Irish Gaelic for Ireland (without dot above)        */
  371.     verKorea                    = 51,                            /* KH    ko_KR*/
  372.     verChina                    = 52,                            /* CH    zh_CN        Simplified Chinese*/
  373.     verTaiwan                    = 53,                            /* TA    zh_TW        Traditional Chinese*/
  374.     verThailand                    = 54,                            /* TH    th_TH*/
  375.     verScriptGeneric            = 55,                            /* SS                Generic script system (no language or script)        */
  376.     verCzech                    = 56,                            /* CZ    cs_CZ*/
  377.     verSlovak                    = 57,                            /* SL    sk_SK*/
  378.     verFarEastGeneric            = 58,                            /* FE                Generic Far East system (no language or script)        */
  379.     verMagyar                    = 59,                            /*                    Unused; see verHungary*/
  380.     verBengali                    = 60,                            /*        bn            Bangladesh or India*/
  381.     verByeloRussian                = 61                            /* BY    be_BY*/
  382. };
  383.  
  384. enum {
  385.     verUkraine                    = 62,                            /* UA    uk_UA*/
  386.                                                                 /*                    63 is unassigned*/
  387.     verGreeceAlt                = 64,                            /*                    unused                                                */
  388.     verSerbian                    = 65,                            /* SR    sr_YU, sh_YU                                                    */
  389.     verSlovenian                = 66,                            /* SV    sl_SI                                                            */
  390.     verMacedonian                = 67,                            /* MD    mk_MK                                                            */
  391.     verCroatia                    = 68,                            /* CR    hr_HR, sh_HR*/
  392.                                                                 /*                    69 is unassigned*/
  393.                                                                 /*                    70 is unassigned*/
  394.     verBrazil                    = 71,                            /* BR    pt_BR        Portuguese for Brazil*/
  395.     verBulgaria                    = 72,                            /* BG    bg_BG*/
  396.     verCatalonia                = 73,                            /* CA    ca_ES        Catalan for Spain*/
  397.     verMultilingual                = 74,                            /* ZM                (no language or script)*/
  398.     verScottishGaelic            = 75,                            /* GD    gd*/
  399.     verManxGaelic                = 76,                            /* GV    gv            Isle of Man*/
  400.     verBreton                    = 77,                            /* BZ    br*/
  401.     verNunavut                    = 78,                            /* IU    iu_CA        Inuktitut for Canada*/
  402.     verWelsh                    = 79,                            /* CU    cy*/
  403.                                                                 /*                    80 is ID for KCHR resource - Canadian CSA*/
  404.     verIrishGaelicScript        = 81,                            /* GS    ga_IE        Irish Gaelic for Ireland (using dot above)*/
  405.     verEngCanada                = 82,                            /* V    en_CA        English for Canada*/
  406.     verBhutan                    = 83,                            /* BH    dz_BT        Dzongkha for Bhutan*/
  407.     verArmenian                    = 84,                            /* HY    hy_AM*/
  408.     verGeorgian                    = 85,                            /* KR    ka_GE*/
  409.     verSpLatinAmerica            = 86,                            /* LA    es            Spanish for Latin America*/
  410.                                                                 /*                    87 is ID for KCHR resource - Spanish ISO*/
  411.     verTonga                    = 88,                            /* TS    to_TO*/
  412.                                                                 /*                    89 is ID for KCHR resource - Polish Modified*/
  413.                                                                 /*                    90 is ID for KCHR resource - Catalan ISO*/
  414.     verFrenchUniversal            = 91,                            /*        fr            French generic*/
  415.     verAustria                    = 92,                            /* AU    de_AT        German for Austria*/
  416.                                                                 /* Y                93 is unused alternate for verSpLatinAmerica*/
  417.     verGujarati                    = 94,                            /*        gu_IN*/
  418.     verPunjabi                    = 95,                            /*        pa            Pakistan or India*/
  419.     verIndiaUrdu                = 96,                            /*        ur_IN        Urdu for India*/
  420.     verVietnam                    = 97                            /*        vi_VN*/
  421. };
  422.  
  423. enum {
  424.     verFrBelgium                = 98,                            /* BF    fr_BE        French for Belgium                                    */
  425.     verUzbek                    = 99,                            /* BD    uz_UZ                                                            */
  426.     verSingapore                = 100,                            /* SG                                                                    */
  427.     verNynorsk                    = 101,                            /* NY      _NO        Norwegian Nynorsk                                    */
  428.     verAfrikaans                = 102,                            /* AK    af_ZA                                                            */
  429.     verEsperanto                = 103,                            /*        eo                                                                */
  430.     verMarathi                    = 104,                            /*        mr_IN                                                            */
  431.     verTibetan                    = 105,                            /*        bo                                                                */
  432.     verNepal                    = 106,                            /*        ne_NP                                                            */
  433.     verGreenland                = 107                            /*        kl                                                                */
  434. };
  435.  
  436. /*
  437.    Other extra resource IDs assigned in the same number space:
  438.     179 is ID for KCHR & itl_ resources - Cornish
  439.     581 is ID for KCHR resource - Irish Gaelic script alternate
  440.     582 is ID for KCHR resource - Ogham
  441.     779 is ID for KCHR resource - Welsh alternate
  442.    1111 is ID for KCHR resource - French numeric
  443. */
  444.  
  445. /*
  446.    Obsolete region code names (kept for backward compatibility):
  447.    Misspelled or alternate form, ambiguous, misleading, considered pejorative, archaic, etc.
  448. */
  449. enum {
  450.     verFrBelgiumLux                = 6,                            /* Incorrect; 6 is Flemish, not French, for Belgium; use verFlemish        */
  451.     verBelgiumLux                = 6,                            /* Use verFlemish*/
  452.     verArabia                    = 16,                            /* Use verArabic*/
  453.     verYugoslavia                = 25,                            /* Use verYugoCroatian (same number, now unused), or newer verCroatia*/
  454.     verIndia                    = 33,                            /* Use verIndiaHindi*/
  455.     verPakistan                    = 34,                            /* Use verPakistanUrdu                                                    */
  456.     verRumania                    = 39,                            /* Alternate for verRomania                                                */
  457.     verGreekAncient                = 40,                            /* Use verGreecePoly                                                    */
  458.     verLapland                    = 46,                            /* Use verSami                                                            */
  459.     verFaeroeIsl                = 47,                            /* Use verFaroeIsl                                                        */
  460.     verGenericFE                = 58,                            /* Use verFarEastGeneric                                                */
  461.     verBelarus                    = 61,                            /* Alternate for verByelorussian                                        */
  462.     verUkrania                    = 62,                            /* Use verUkraine*/
  463.     verAlternateGr                = 64,                            /* Use verGreeceAlt                                                        */
  464.     verSerbia                    = 65,                            /* Alternate for verSerbian                                                */
  465.     verSlovenia                    = 66,                            /* Alternate for verSlovenian                                            */
  466.     verMacedonia                = 67,                            /* Alternate for verMacedonian                                            */
  467.     verBrittany                    = 77,                            /* Alternate for verBreton                                                */
  468.     verWales                    = 79,                            /* Alternate for verWelsh                                                */
  469.     verArmenia                    = 84,                            /* Alternate for verArmenian                                            */
  470.     verGeorgia                    = 85,                            /* Alternate for verGeorgian                                            */
  471.     verAustriaGerman            = 92,                            /* Use verAustria                                                        */
  472.     verTibet                    = 105                            /* Use verTibetan                                                        */
  473. };
  474.  
  475. enum {
  476.     minCountry                    = verUS,
  477.     maxCountry                    = verGreenland
  478. };
  479.  
  480. enum {
  481.                                                                 /* Calendar Codes */
  482.     calGregorian                = 0,
  483.     calArabicCivil                = 1,
  484.     calArabicLunar                = 2,
  485.     calJapanese                    = 3,
  486.     calJewish                    = 4,
  487.     calCoptic                    = 5,
  488.     calPersian                    = 6
  489. };
  490.  
  491. enum {
  492.                                                                 /* Integer Format Codes */
  493.     intWestern                    = 0,
  494.     intArabic                    = 1,
  495.     intRoman                    = 2,
  496.     intJapanese                    = 3,
  497.     intEuropean                    = 4,
  498.     intOutputMask                = 0x8000
  499. };
  500.  
  501. enum {
  502.                                                                 /* CharByte byte types */
  503.     smSingleByte                = 0,
  504.     smFirstByte                    = -1,
  505.     smLastByte                    = 1,
  506.     smMiddleByte                = 2
  507. };
  508.  
  509. enum {
  510.                                                                 /* CharType field masks */
  511.     smcTypeMask                    = 0x000F,
  512.     smcReserved                    = 0x00F0,
  513.     smcClassMask                = 0x0F00,
  514.     smcOrientationMask            = 0x1000,                        /*two-byte script glyph orientation*/
  515.     smcRightMask                = 0x2000,
  516.     smcUpperMask                = 0x4000,
  517.     smcDoubleMask                = 0x8000
  518. };
  519.  
  520. enum {
  521.                                                                 /* Basic CharType character types */
  522.     smCharPunct                    = 0x0000,
  523.     smCharAscii                    = 0x0001,
  524.     smCharEuro                    = 0x0007,
  525.     smCharExtAscii                = 0x0007,                        /* More correct synonym for smCharEuro */
  526.                                                                 /* Additional CharType character types for script systems */
  527.     smCharKatakana                = 0x0002,                        /*Japanese Katakana*/
  528.     smCharHiragana                = 0x0003,                        /*Japanese Hiragana*/
  529.     smCharIdeographic            = 0x0004,                        /*Hanzi, Kanji, Hanja*/
  530.     smCharTwoByteGreek            = 0x0005,                        /*2-byte Greek in Far East systems*/
  531.     smCharTwoByteRussian        = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  532.     smCharBidirect                = 0x0008,                        /*Arabic/Hebrew*/
  533.     smCharContextualLR            = 0x0009,                        /*Contextual left-right: Thai, Indic scripts*/
  534.     smCharNonContextualLR        = 0x000A,                        /*Non-contextual left-right: Cyrillic, Greek*/
  535.     smCharHangul                = 0x000C,                        /*Korean Hangul*/
  536.     smCharJamo                    = 0x000D,                        /*Korean Jamo*/
  537.     smCharBopomofo                = 0x000E,                        /*Chinese Bopomofo*/
  538.     smCharGanaKana                = 0x000F,                        /*Shared for Japanese Hiragana & Katakana*/
  539.                                                                 /* old names for some of above, for backward compatibility */
  540.     smCharFISKana                = 0x0002,                        /*Katakana*/
  541.     smCharFISGana                = 0x0003,                        /*Hiragana*/
  542.     smCharFISIdeo                = 0x0004                        /*Hanzi, Kanji, Hanja*/
  543. };
  544.  
  545. enum {
  546.     smCharFISGreek                = 0x0005,                        /*2-byte Greek in Far East systems*/
  547.     smCharFISRussian            = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  548.                                                                 /* CharType classes for punctuation (smCharPunct) */
  549.     smPunctNormal                = 0x0000,
  550.     smPunctNumber                = 0x0100,
  551.     smPunctSymbol                = 0x0200,
  552.     smPunctBlank                = 0x0300,                        /* Additional CharType classes for punctuation in two-byte systems */
  553.     smPunctRepeat                = 0x0400,                        /* repeat marker */
  554.     smPunctGraphic                = 0x0500,                        /* line graphics */
  555.                                                                 /* CharType Katakana and Hiragana classes for two-byte systems */
  556.     smKanaSmall                    = 0x0100,                        /*small kana character*/
  557.     smKanaHardOK                = 0x0200,                        /*can have dakuten*/
  558.     smKanaSoftOK                = 0x0300,                        /*can have dakuten or han-dakuten*/
  559.                                                                 /* CharType Ideographic classes for two-byte systems */
  560.     smIdeographicLevel1            = 0x0000,                        /*level 1 char*/
  561.     smIdeographicLevel2            = 0x0100,                        /*level 2 char*/
  562.     smIdeographicUser            = 0x0200,                        /*user char*/
  563.                                                                 /* old names for above, for backward compatibility */
  564.     smFISClassLvl1                = 0x0000,                        /*level 1 char*/
  565.     smFISClassLvl2                = 0x0100,                        /*level 2 char*/
  566.     smFISClassUser                = 0x0200,                        /*user char*/
  567.                                                                 /* CharType Jamo classes for Korean systems */
  568.     smJamoJaeum                    = 0x0000,                        /*simple consonant char*/
  569.     smJamoBogJaeum                = 0x0100,                        /*complex consonant char*/
  570.     smJamoMoeum                    = 0x0200,                        /*simple vowel char*/
  571.     smJamoBogMoeum                = 0x0300                        /*complex vowel char*/
  572. };
  573.  
  574. enum {
  575.                                                                 /* CharType glyph orientation for two-byte systems */
  576.     smCharHorizontal            = 0x0000,                        /* horizontal character form, or for both */
  577.     smCharVertical                = 0x1000,                        /* vertical character form */
  578.                                                                 /* CharType directions */
  579.     smCharLeft                    = 0x0000,
  580.     smCharRight                    = 0x2000,                        /* CharType case modifers */
  581.     smCharLower                    = 0x0000,
  582.     smCharUpper                    = 0x4000,                        /* CharType character size modifiers (1 or multiple bytes). */
  583.     smChar1byte                    = 0x0000,
  584.     smChar2byte                    = 0x8000
  585. };
  586.  
  587. enum {
  588.                                                                 /* TransliterateText target types for Roman */
  589.     smTransAscii                = 0,                            /*convert to ASCII*/
  590.     smTransNative                = 1,                            /*convert to font script*/
  591.     smTransCase                    = 0xFE,                            /*convert case for all text*/
  592.     smTransSystem                = 0xFF,                            /*convert to system script*/
  593.                                                                 /* TransliterateText target types for two-byte scripts */
  594.     smTransAscii1                = 2,                            /*1-byte Roman*/
  595.     smTransAscii2                = 3,                            /*2-byte Roman*/
  596.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  597.     smTransKana2                = 5                                /*2-byte Japanese Katakana*/
  598. };
  599.  
  600. enum {
  601.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  602.     smTransHangul2                = 8,                            /*2-byte Korean Hangul*/
  603.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  604.     smTransBopomofo2            = 10,                            /*2-byte Chinese Bopomofo*/
  605.                                                                 /* TransliterateText target modifiers */
  606.     smTransLower                = 0x4000,                        /*target becomes lowercase*/
  607.     smTransUpper                = 0x8000,                        /*target becomes uppercase*/
  608.                                                                 /* TransliterateText resource format numbers */
  609.     smTransRuleBaseFormat        = 1,                            /*Rule based trsl resource format */
  610.     smTransHangulFormat            = 2,                            /*Table based Hangul trsl resource format*/
  611.                                                                 /* TransliterateText property flags */
  612.     smTransPreDoubleByting        = 1,                            /*Convert all text to double byte before transliteration*/
  613.     smTransPreLowerCasing        = 2                                /*Convert all text to lower case before transliteration*/
  614. };
  615.  
  616. enum {
  617.                                                                 /* TransliterateText source mask - general */
  618.     smMaskAll                    = (long)0xFFFFFFFF,                /*Convert all text*/
  619.                                                                 /* TransliterateText source masks */
  620.     smMaskAscii                    = 0x00000001,                    /*2^smTransAscii*/
  621.     smMaskNative                = 0x00000002,                    /*2^smTransNative*/
  622.                                                                 /* TransliterateText source masks for two-byte scripts */
  623.     smMaskAscii1                = 0x00000004,                    /*2^smTransAscii1*/
  624.     smMaskAscii2                = 0x00000008,                    /*2^smTransAscii2*/
  625.     smMaskKana1                    = 0x00000010,                    /*2^smTransKana1*/
  626.     smMaskKana2                    = 0x00000020,                    /*2^smTransKana2*/
  627.     smMaskGana2                    = 0x00000080,                    /*2^smTransGana2*/
  628.     smMaskHangul2                = 0x00000100,                    /*2^smTransHangul2*/
  629.     smMaskJamo2                    = 0x00000200,                    /*2^smTransJamo2*/
  630.     smMaskBopomofo2                = 0x00000400                    /*2^smTransBopomofo2*/
  631. };
  632.  
  633. enum {
  634.                                                                 /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  635.     smNotInstalled                = 0,                            /*routine not available in script*/
  636.     smBadVerb                    = -1,                            /*Bad verb passed to a routine*/
  637.     smBadScript                    = -2                            /*Bad script code passed to a routine*/
  638. };
  639.  
  640. enum {
  641.                                                                 /* Values for script redraw flag. */
  642.     smRedrawChar                = 0,                            /*Redraw character only*/
  643.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  644.     smRedrawLine                = -1                            /*Redraw entire line (bidirectional systems)*/
  645. };
  646.  
  647. enum {
  648.                                                                 /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  649.     smVersion                    = 0,                            /*Script Manager version number*/
  650.     smMunged                    = 2,                            /*Globals change count*/
  651.     smEnabled                    = 4,                            /*Count of enabled scripts, incl Roman*/
  652.     smBidirect                    = 6,                            /*At least one bidirectional script*/
  653.     smFontForce                    = 8,                            /*Force font flag*/
  654.     smIntlForce                    = 10,                            /*Force intl flag*/
  655.     smForced                    = 12,                            /*Script was forced to system script*/
  656.     smDefault                    = 14,                            /*Script was defaulted to Roman script*/
  657.     smPrint                        = 16,                            /*Printer action routine*/
  658.     smSysScript                    = 18,                            /*System script*/
  659.     smLastScript                = 20,                            /*Last keyboard script*/
  660.     smKeyScript                    = 22,                            /*Keyboard script*/
  661.     smSysRef                    = 24,                            /*System folder refNum*/
  662.     smKeyCache                    = 26,                            /*obsolete*/
  663.     smKeySwap                    = 28,                            /*Swapping table handle*/
  664.     smGenFlags                    = 30,                            /*General flags long*/
  665.     smOverride                    = 32,                            /*Script override flags*/
  666.     smCharPortion                = 34,                            /*Ch vs SpExtra proportion*/
  667.                                                                 /* New for System 7.0: */
  668.     smDoubleByte                = 36,                            /*Flag for double-byte script installed*/
  669.     smKCHRCache                    = 38,                            /*Returns pointer to KCHR cache*/
  670.     smRegionCode                = 40,                            /*Returns current region code (verXxx)*/
  671.     smKeyDisableState            = 42                            /*Returns current keyboard disable state*/
  672. };
  673.  
  674. enum {
  675.                                                                 /* GetScriptVariable and SetScriptVariable verbs. */
  676.                                                                 /* Note: Verbs private to script systems are negative, while */
  677.                                                                 /* those general across script systems are non-negative. */
  678.     smScriptVersion                = 0,                            /*Script software version*/
  679.     smScriptMunged                = 2,                            /*Script entry changed count*/
  680.     smScriptEnabled                = 4,                            /*Script enabled flag*/
  681.     smScriptRight                = 6,                            /*Right to left flag*/
  682.     smScriptJust                = 8,                            /*Justification flag*/
  683.     smScriptRedraw                = 10,                            /*Word redraw flag*/
  684.     smScriptSysFond                = 12,                            /*Preferred system font*/
  685.     smScriptAppFond                = 14,                            /*Preferred Application font*/
  686.     smScriptBundle                = 16,                            /*Beginning of itlb verbs*/
  687.     smScriptNumber                = 16,                            /*Script itl0 id*/
  688.     smScriptDate                = 18,                            /*Script itl1 id*/
  689.     smScriptSort                = 20,                            /*Script itl2 id*/
  690.     smScriptFlags                = 22,                            /*flags word*/
  691.     smScriptToken                = 24,                            /*Script itl4 id*/
  692.     smScriptEncoding            = 26,                            /*id of optional itl5, if present*/
  693.     smScriptLang                = 28                            /*Current language for script*/
  694. };
  695.  
  696. enum {
  697.     smScriptNumDate                = 30,                            /*Script Number/Date formats.*/
  698.     smScriptKeys                = 32,                            /*Script KCHR id*/
  699.     smScriptIcon                = 34,                            /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  700.     smScriptPrint                = 36,                            /*Script printer action routine*/
  701.     smScriptTrap                = 38,                            /*Trap entry pointer*/
  702.     smScriptCreator                = 40,                            /*Script file creator*/
  703.     smScriptFile                = 42,                            /*Script file name*/
  704.     smScriptName                = 44,                            /*Script name*/
  705.                                                                 /* There is a hole here for old Kanji private verbs 46-76 */
  706.                                                                 /* New for System 7.0: */
  707.     smScriptMonoFondSize        = 78,                            /*default monospace FOND (hi) & size (lo)*/
  708.     smScriptPrefFondSize        = 80,                            /*preferred FOND (hi) & size (lo)*/
  709.     smScriptSmallFondSize        = 82,                            /*default small FOND (hi) & size (lo)*/
  710.     smScriptSysFondSize            = 84,                            /*default system FOND (hi) & size (lo)*/
  711.     smScriptAppFondSize            = 86,                            /*default app FOND (hi) & size (lo)*/
  712.     smScriptHelpFondSize        = 88,                            /*default Help Mgr FOND (hi) & size (lo)*/
  713.     smScriptValidStyles            = 90,                            /*mask of valid styles for script*/
  714.     smScriptAliasStyle            = 92                            /*style (set) to use for aliases*/
  715. };
  716.  
  717. /* special negative verbs for Get/SetScriptVariable that were associated with WorldScriptI */
  718. /* move them here to be public */
  719. enum {
  720.                                                                 /* WorldScript private verbs */
  721.     smLayoutCache                = -309,                            /* HiWrd(param) is # entries, LoWrd is max input length*/
  722.     smOldVerbSupport            = -311,                            /* param is added to old verbs to map to WSI verb*/
  723.     smSetKashidas                = -291,                            /* param is ON or OFF, old verb = -36*/
  724.     smSetKashProp                = -287,                            /* param is kashida proportion, old verb = -32*/
  725.     smScriptSysBase                = -281,                            /* param is associated font to use w/ system font (old verb = -26)*/
  726.     smScriptAppBase                = -283,                            /* param is associated font to use w/ app font (old verb = -28)*/
  727.     smScriptFntBase                = -285,                            /* param is associated font to use w/ all other fonts (old verb = -30)*/
  728.     smScriptLigatures            = -263,                            /* old verb = -8*/
  729.     smScriptNumbers                = -267                            /* old verb = -12*/
  730. };
  731.  
  732. enum {
  733.                                                                 /* Special script code values for International Utilities */
  734.     iuSystemScript                = -1,                            /* <obsolete>  system script */
  735.     iuCurrentScript                = -2                            /* <obsolete>  current script (for font of grafPort) */
  736. };
  737.  
  738. enum {
  739.                                                                 /* Negative verbs for KeyScript */
  740.     smKeyNextScript                = -1,                            /* Switch to next available script */
  741.     smKeySysScript                = -2,                            /* Switch to the system script */
  742.     smKeySwapScript                = -3,                            /* Switch to previously-used script */
  743.                                                                 /* New for System 7.0: */
  744.     smKeyNextKybd                = -4,                            /* Switch to next keyboard in current keyscript */
  745.     smKeySwapKybd                = -5,                            /* Switch to previously-used keyboard in current keyscript */
  746.     smKeyDisableKybds            = -6,                            /* Disable keyboards not in system or Roman script */
  747.     smKeyEnableKybds            = -7,                            /* Re-enable keyboards for all enabled scripts */
  748.     smKeyToggleInline            = -8,                            /* Toggle inline input for current keyscript */
  749.     smKeyToggleDirection        = -9,                            /* Toggle default line direction (TESysJust) */
  750.     smKeyNextInputMethod        = -10,                            /* Switch to next input method in current keyscript */
  751.     smKeySwapInputMethod        = -11,                            /* Switch to last-used input method in current keyscript */
  752.     smKeyDisableKybdSwitch        = -12,                            /* Disable switching from the current keyboard */
  753.     smKeySetDirLeftRight        = -15,                            /* Set default line dir to left-right, align left */
  754.     smKeySetDirRightLeft        = -16,                            /* Set default line dir to right-left, align right */
  755.     smKeyRoman                    = -17                            /* Set keyscript to Roman. Does nothing if Roman-only system, unlike KeyScript(smRoman) which forces an update to current default Roman keyboard */
  756. };
  757.  
  758. /* Optional font and keyboard script synchronization */
  759. enum {
  760.                                                                 /* One more flag in the smGenFlags long. */
  761.     smfDisableKeyScriptSync        = 27                            /*Disable font and keyboard script synchronization*/
  762. };
  763.  
  764. enum {
  765.                                                                 /* We should define masks, too. */
  766.     smfDisableKeyScriptSyncMask    = 1L << smfDisableKeyScriptSync    /*Disable font and keyboard script synchronization mask*/
  767. };
  768.  
  769. enum {
  770.                                                                 /* Force keyboard script switching flag and mask for zero and positive KeyScript verbs */
  771.     smKeyForceKeyScriptBit        = 7,                            /* Force keyboard script switching flag */
  772.     smKeyForceKeyScriptMask        = 1 << smKeyForceKeyScriptBit    /* its mask */
  773. };
  774.  
  775. enum {
  776.                                                                 /* Bits in the smScriptFlags word */
  777.                                                                 /*  (bits above 8 are non-static) */
  778.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  779.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  780.     smsfNatCase                    = 2,                            /*Native chars have upper & lower case*/
  781.     smsfContext                    = 3,                            /*Script is contextual*/
  782.     smsfNoForceFont                = 4,                            /*Script will not force characters*/
  783.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  784.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  785.     smsfUnivExt                    = 7,                            /*Script is handled by universal extension*/
  786.     smsfSynchUnstyledTE            = 8,                            /*Script synchronizes for unstyled TE*/
  787.     smsfForms                    = 13,                            /*Uses contextual forms for letters*/
  788.     smsfLigatures                = 14,                            /*Uses contextual ligatures*/
  789.     smsfReverse                    = 15,                            /*Reverses native text, right-left*/
  790.                                                                 /* Bits in the smGenFlags long. */
  791.                                                                 /* First (high-order) byte is set from itlc flags byte. */
  792.     smfShowIcon                    = 31,                            /*Show icon even if only one script*/
  793.     smfDualCaret                = 30,                            /*Use dual caret for mixed direction text*/
  794.     smfNameTagEnab                = 29,                            /*Reserved for internal use*/
  795.     smfUseAssocFontInfo            = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  796. };
  797.  
  798. enum {
  799.                                                                 /* Roman script constants */
  800.                                                                 /* The following are here for backward compatibility, but should not be used. */
  801.                                                                 /* This information should be obtained using GetScript. */
  802.     romanSysFond                = 0x3FFF,                        /*system font id number*/
  803.     romanAppFond                = 3,                            /*application font id number*/
  804.     romanFlags                    = 0x0007,                        /*roman settings*/
  805.                                                                 /* Script Manager font equates. */
  806.     smFondStart                    = 0x4000,                        /*start from 16K*/
  807.     smFondEnd                    = 0xC000,                        /*past end of range at 48K*/
  808.                                                                 /* Miscellaneous font equates. */
  809.     smUprHalfCharSet            = 0x80                            /*first char code in top half of std char set*/
  810. };
  811.  
  812. enum {
  813.                                                                 /* Character Set Extensions */
  814.     diaeresisUprY                = 0xD9,
  815.     fraction                    = 0xDA,
  816.     intlCurrency                = 0xDB,
  817.     leftSingGuillemet            = 0xDC,
  818.     rightSingGuillemet            = 0xDD,
  819.     fiLigature                    = 0xDE,
  820.     flLigature                    = 0xDF,
  821.     dblDagger                    = 0xE0,
  822.     centeredDot                    = 0xE1,
  823.     baseSingQuote                = 0xE2,
  824.     baseDblQuote                = 0xE3,
  825.     perThousand                    = 0xE4,
  826.     circumflexUprA                = 0xE5,
  827.     circumflexUprE                = 0xE6,
  828.     acuteUprA                    = 0xE7,
  829.     diaeresisUprE                = 0xE8,
  830.     graveUprE                    = 0xE9,
  831.     acuteUprI                    = 0xEA,
  832.     circumflexUprI                = 0xEB,
  833.     diaeresisUprI                = 0xEC,
  834.     graveUprI                    = 0xED,
  835.     acuteUprO                    = 0xEE,
  836.     circumflexUprO                = 0xEF,
  837.     appleLogo                    = 0xF0,
  838.     graveUprO                    = 0xF1,
  839.     acuteUprU                    = 0xF2,
  840.     circumflexUprU                = 0xF3,
  841.     graveUprU                    = 0xF4,
  842.     dotlessLwrI                    = 0xF5,
  843.     circumflex                    = 0xF6,
  844.     tilde                        = 0xF7,
  845.     macron                        = 0xF8,
  846.     breveMark                    = 0xF9,
  847.     overDot                        = 0xFA,
  848.     ringMark                    = 0xFB,
  849.     cedilla                        = 0xFC,
  850.     doubleAcute                    = 0xFD,
  851.     ogonek                        = 0xFE,
  852.     hachek                        = 0xFF
  853. };
  854.  
  855. enum {
  856.                                                                 /* ScriptTokenType values */
  857.     tokenIntl                    = 4,                            /*the itl resource number of the tokenizer*/
  858.     tokenEmpty                    = -1                            /*used internally as an empty flag*/
  859. };
  860.  
  861. enum {
  862.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  863.     tokenWhite                    = 1,                            /*white space*/
  864.     tokenLeftLit                = 2,                            /*literal begin*/
  865.     tokenRightLit                = 3,                            /*literal end*/
  866.     tokenAlpha                    = 4,                            /*alphabetic*/
  867.     tokenNumeric                = 5,                            /*numeric*/
  868.     tokenNewLine                = 6,                            /*new line*/
  869.     tokenLeftComment            = 7,                            /*open comment*/
  870.     tokenRightComment            = 8,                            /*close comment*/
  871.     tokenLiteral                = 9,                            /*literal*/
  872.     tokenEscape                    = 10,                            /*character escape (e.g. '\' in "\n", "\t")*/
  873.     tokenAltNum                    = 11,                            /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  874.     tokenRealNum                = 12,                            /*real number*/
  875.     tokenAltReal                = 13,                            /*alternate real number*/
  876.     tokenReserve1                = 14,                            /*reserved*/
  877.     tokenReserve2                = 15,                            /*reserved*/
  878.     tokenLeftParen                = 16,                            /*open parenthesis*/
  879.     tokenRightParen                = 17,                            /*close parenthesis*/
  880.     tokenLeftBracket            = 18,                            /*open square bracket*/
  881.     tokenRightBracket            = 19                            /*close square bracket*/
  882. };
  883.  
  884. enum {
  885.     tokenLeftCurly                = 20,                            /*open curly bracket*/
  886.     tokenRightCurly                = 21,                            /*close curly bracket*/
  887.     tokenLeftEnclose            = 22,                            /*open guillemet*/
  888.     tokenRightEnclose            = 23,                            /*close guillemet*/
  889.     tokenPlus                    = 24,
  890.     tokenMinus                    = 25,
  891.     tokenAsterisk                = 26,                            /*times/multiply*/
  892.     tokenDivide                    = 27,
  893.     tokenPlusMinus                = 28,                            /*plus or minus symbol*/
  894.     tokenSlash                    = 29,
  895.     tokenBackSlash                = 30,
  896.     tokenLess                    = 31,                            /*less than symbol*/
  897.     tokenGreat                    = 32,                            /*greater than symbol*/
  898.     tokenEqual                    = 33,
  899.     tokenLessEqual2                = 34,                            /*less than or equal, 2 characters (e.g. <=)*/
  900.     tokenLessEqual1                = 35,                            /*less than or equal, 1 character*/
  901.     tokenGreatEqual2            = 36,                            /*greater than or equal, 2 characters (e.g. >=)*/
  902.     tokenGreatEqual1            = 37,                            /*greater than or equal, 1 character*/
  903.     token2Equal                    = 38,                            /*double equal (e.g. ==)*/
  904.     tokenColonEqual                = 39                            /*colon equal*/
  905. };
  906.  
  907. enum {
  908.     tokenNotEqual                = 40,                            /*not equal, 1 character*/
  909.     tokenLessGreat                = 41,                            /*less/greater, Pascal not equal (e.g. <>)*/
  910.     tokenExclamEqual            = 42,                            /*exclamation equal, C not equal (e.g. !=)*/
  911.     tokenExclam                    = 43,                            /*exclamation point*/
  912.     tokenTilde                    = 44,                            /*centered tilde*/
  913.     tokenComma                    = 45,
  914.     tokenPeriod                    = 46,
  915.     tokenLeft2Quote                = 47,                            /*open double quote*/
  916.     tokenRight2Quote            = 48,                            /*close double quote*/
  917.     tokenLeft1Quote                = 49,                            /*open single quote*/
  918.     tokenRight1Quote            = 50,                            /*close single quote*/
  919.     token2Quote                    = 51,                            /*double quote*/
  920.     token1Quote                    = 52,                            /*single quote*/
  921.     tokenSemicolon                = 53,
  922.     tokenPercent                = 54,
  923.     tokenCaret                    = 55,
  924.     tokenUnderline                = 56,
  925.     tokenAmpersand                = 57,
  926.     tokenAtSign                    = 58,
  927.     tokenBar                    = 59                            /*vertical bar*/
  928. };
  929.  
  930. enum {
  931.     tokenQuestion                = 60,
  932.     tokenPi                        = 61,                            /*lower-case pi*/
  933.     tokenRoot                    = 62,                            /*square root symbol*/
  934.     tokenSigma                    = 63,                            /*capital sigma*/
  935.     tokenIntegral                = 64,                            /*integral sign*/
  936.     tokenMicro                    = 65,
  937.     tokenCapPi                    = 66,                            /*capital pi*/
  938.     tokenInfinity                = 67,
  939.     tokenColon                    = 68,
  940.     tokenHash                    = 69,                            /*e.g. #*/
  941.     tokenDollar                    = 70,
  942.     tokenNoBreakSpace            = 71,                            /*non-breaking space*/
  943.     tokenFraction                = 72,
  944.     tokenIntlCurrency            = 73,
  945.     tokenLeftSingGuillemet        = 74,
  946.     tokenRightSingGuillemet        = 75,
  947.     tokenPerThousand            = 76,
  948.     tokenEllipsis                = 77,
  949.     tokenCenterDot                = 78,
  950.     tokenNil                    = 127
  951. };
  952.  
  953. enum {
  954.     delimPad                    = -2,                            /* obsolete, misspelled token names kept for backward compatibility */
  955.     tokenTilda                    = 44,
  956.     tokenCarat                    = 55
  957. };
  958.  
  959. enum {
  960.                                                                 /* Table selectors for GetItlTable */
  961.     smWordSelectTable            = 0,                            /* get word select break table from 'itl2' */
  962.     smWordWrapTable                = 1,                            /* get word wrap break table from 'itl2' */
  963.     smNumberPartsTable            = 2,                            /* get default number parts table from 'itl4' */
  964.     smUnTokenTable                = 3,                            /* get unToken table from 'itl4' */
  965.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  966.     iuWordSelectTable            = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  967.     iuWordWrapTable                = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  968.     iuNumberPartsTable            = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  969.     iuUnTokenTable                = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  970.     iuWhiteSpaceList            = 4                                /* <obsolete>  get white space list from 'itl4' */
  971. };
  972.  
  973. /* end of stuff moved from Packages.h */
  974. enum {
  975.     tokenOK                        = 0,                            /* TokenResults */
  976.     tokenOverflow                = 1,                            /* TokenResults */
  977.     stringOverflow                = 2,                            /* TokenResults */
  978.     badDelim                    = 3,                            /* TokenResults */
  979.     badEnding                    = 4,                            /* TokenResults */
  980.     crash                        = 5                                /* TokenResults */
  981. };
  982.  
  983. typedef SInt8                             TokenResults;
  984. typedef char                             CharByteTable[256];
  985. /* "TokenType" was renamed to "ScriptTokenType" because of a name collision in QuickTime 3.0 on other OS's*/
  986. typedef short                             ScriptTokenType;
  987. #if TARGET_OS_MAC
  988. typedef ScriptTokenType                 TokenType;
  989. #endif  /* TARGET_OS_MAC */
  990.  
  991. typedef ScriptTokenType                 DelimType[2];
  992. typedef ScriptTokenType                 CommentType[4];
  993.  
  994. struct TokenRec {
  995.     ScriptTokenType                 theToken;
  996.     Ptr                             position;                    /*pointer into original source*/
  997.     long                             length;                        /*length of text in original source*/
  998.     StringPtr                         stringPosition;                /*Pascal/C string copy of identifier*/
  999. };
  1000. typedef struct TokenRec                    TokenRec;
  1001. typedef TokenRec *                        TokenRecPtr;
  1002.  
  1003. struct TokenBlock {
  1004.     Ptr                             source;                        /*pointer to stream of characters*/
  1005.     long                             sourceLength;                /*length of source stream*/
  1006.     Ptr                             tokenList;                    /*pointer to array of tokens*/
  1007.     long                             tokenLength;                /*maximum length of TokenList*/
  1008.     long                             tokenCount;                    /*number tokens generated by tokenizer*/
  1009.     Ptr                             stringList;                    /*pointer to stream of identifiers*/
  1010.     long                             stringLength;                /*length of string list*/
  1011.     long                             stringCount;                /*number of bytes currently used*/
  1012.     Boolean                         doString;                    /*make strings & put into StringList*/
  1013.     Boolean                         doAppend;                    /*append to TokenList rather than replace*/
  1014.     Boolean                         doAlphanumeric;                /*identifiers may include numeric*/
  1015.     Boolean                         doNest;                        /*do comments nest?*/
  1016.     ScriptTokenType                 leftDelims[2];
  1017.     ScriptTokenType                 rightDelims[2];
  1018.     ScriptTokenType                 leftComment[4];
  1019.     ScriptTokenType                 rightComment[4];
  1020.     ScriptTokenType                 escapeCode;                    /*escape symbol code*/
  1021.     ScriptTokenType                 decimalCode;
  1022.     Handle                             itlResource;                /*handle to itl4 resource of current script*/
  1023.     long                             reserved[8];                /*must be zero!*/
  1024. };
  1025. typedef struct TokenBlock                TokenBlock;
  1026. typedef TokenBlock *                    TokenBlockPtr;
  1027. EXTERN_API( short )
  1028. GetSysDirection                    (void)                                                        TWOWORDINLINE(0x3EB8, 0x0BAC);
  1029.  
  1030. EXTERN_API( void )
  1031. SetSysDirection                    (short                     value)                                TWOWORDINLINE(0x31DF, 0x0BAC);
  1032.  
  1033. EXTERN_API( short )
  1034. FontScript                        (void)                                                        FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  1035.  
  1036. EXTERN_API( short )
  1037. IntlScript                        (void)                                                        FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  1038.  
  1039. EXTERN_API( void )
  1040. KeyScript                        (short                     code)                                FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  1041.  
  1042. EXTERN_API( Boolean )
  1043. IsCmdChar                        (const EventRecord *    event,
  1044.                                  short                     test)                                FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  1045.  
  1046. EXTERN_API( short )
  1047. FontToScript                    (short                     fontNumber)                            FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  1048.  
  1049. EXTERN_API( long )
  1050. GetScriptManagerVariable        (short                     selector)                            FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  1051.  
  1052. EXTERN_API( OSErr )
  1053. SetScriptManagerVariable        (short                     selector,
  1054.                                  long                     param)                                FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  1055.  
  1056. EXTERN_API( long )
  1057. GetScriptVariable                (short                     script,
  1058.                                  short                     selector)                            FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  1059.  
  1060. EXTERN_API( OSErr )
  1061. SetScriptVariable                (short                     script,
  1062.                                  short                     selector,
  1063.                                  long                     param)                                FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  1064.  
  1065. EXTERN_API( short )
  1066. CharacterByteType                (Ptr                     textBuf,
  1067.                                  short                     textOffset,
  1068.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  1069.  
  1070. EXTERN_API( short )
  1071. CharacterType                    (Ptr                     textBuf,
  1072.                                  short                     textOffset,
  1073.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  1074.  
  1075. EXTERN_API( OSErr )
  1076. TransliterateText                (Handle                 srcHandle,
  1077.                                  Handle                 dstHandle,
  1078.                                  short                     target,
  1079.                                  long                     srcMask,
  1080.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  1081.  
  1082. EXTERN_API( Boolean )
  1083. FillParseTable                    (CharByteTable             table,
  1084.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  1085.  
  1086. EXTERN_API( Handle )
  1087. GetIntlResource                    (short                     theID)                                THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  1088.  
  1089. EXTERN_API( void )
  1090. ClearIntlResourceCache            (void)                                                        THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  1091.  
  1092. EXTERN_API( void )
  1093. GetIntlResourceTable            (ScriptCode             script,
  1094.                                  short                     tableCode,
  1095.                                  Handle *                itlHandle,
  1096.                                  long *                    offset,
  1097.                                  long *                    length)                                THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  1098.  
  1099. #if CALL_NOT_IN_CARBON
  1100. EXTERN_API( UniversalProcPtr )
  1101. GetScriptUtilityAddress            (short                     selector,
  1102.                                  Boolean                 Before,
  1103.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  1104.  
  1105. EXTERN_API( void )
  1106. SetScriptUtilityAddress            (short                     selector,
  1107.                                  Boolean                 Before,
  1108.                                  UniversalProcPtr         routineAddr,
  1109.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  1110.  
  1111. EXTERN_API( UniversalProcPtr )
  1112. GetScriptQDPatchAddress            (short                     trapNum,
  1113.                                  Boolean                 Before,
  1114.                                  Boolean                 forPrinting,
  1115.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  1116.  
  1117. EXTERN_API( void )
  1118. SetScriptQDPatchAddress            (short                     trapNum,
  1119.                                  Boolean                 Before,
  1120.                                  Boolean                 forPrinting,
  1121.                                  UniversalProcPtr         routineAddr,
  1122.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  1123.  
  1124. EXTERN_API( void )
  1125. SetIntlResource                    (short                     refNum,
  1126.                                  short                     theID,
  1127.                                  Handle                 intlHandle)                            THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  1128.  
  1129. EXTERN_API( short )
  1130. CharByte                        (Ptr                     textBuf,
  1131.                                  short                     textOffset)                            FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  1132.  
  1133. EXTERN_API( short )
  1134. CharType                        (Ptr                     textBuf,
  1135.                                  short                     textOffset)                            FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  1136.  
  1137. EXTERN_API( OSErr )
  1138. Transliterate                    (Handle                 srcHandle,
  1139.                                  Handle                 dstHandle,
  1140.                                  short                     target,
  1141.                                  long                     srcMask)                            FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  1142.  
  1143. EXTERN_API( Boolean )
  1144. ParseTable                        (CharByteTable             table)                                FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  1145.  
  1146. #endif  /* CALL_NOT_IN_CARBON */
  1147.  
  1148. EXTERN_API( TokenResults )
  1149. IntlTokenize                    (TokenBlockPtr             tokenParam)                            FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  1150.  
  1151. #if OLDROUTINENAMES
  1152. #define SetSysJust(newJust) SetSysDirection(newJust)
  1153. #define GetSysJust() GetSysDirection()
  1154. #define Font2Script(fontNumber) FontToScript(fontNumber)
  1155. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  1156. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  1157. #define GetScript(script, verb) GetScriptVariable(script, verb)
  1158. #define SetScript(script, verb, param) SetScriptVariable(script, verb, param)
  1159. #define IUGetIntl(theID) GetIntlResource(theID) 
  1160. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  1161. #define IUClearCache() ClearIntlResourceCache()
  1162. #define IUGetItlTable(script, tableCode, itlHandle, offset, length) \
  1163.          GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  1164. #endif  /* OLDROUTINENAMES */
  1165.  
  1166.  
  1167.  
  1168. #if PRAGMA_STRUCT_ALIGN
  1169.     #pragma options align=reset
  1170. #elif PRAGMA_STRUCT_PACKPUSH
  1171.     #pragma pack(pop)
  1172. #elif PRAGMA_STRUCT_PACK
  1173.     #pragma pack()
  1174. #endif
  1175.  
  1176. #ifdef PRAGMA_IMPORT_OFF
  1177. #pragma import off
  1178. #elif PRAGMA_IMPORT
  1179. #pragma import reset
  1180. #endif
  1181.  
  1182. #ifdef __cplusplus
  1183. }
  1184. #endif
  1185.  
  1186. #endif /* __SCRIPT__ */
  1187.  
  1188.